﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Langben.DAL
{
    [MetadataType(typeof(ReserveMetadata))]//使用ReserveMetadata对Reserve进行数据验证
    public partial class Reserve : IBaseEntity
    {
      
        #region 自定义属性，即由数据实体扩展的实体
        
        [Display(Name = "ApplicantsId")]
        public string ApplicantsIdOld { get; set; }
        
        #endregion

    }
    public class ReserveMetadata
    {
			[ScaffoldColumn(false)]
			[Display(Name = "唯一标识", Order = 1)]
			public object RowGuid { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "创建时间", Order = 2)]
			[DataType(System.ComponentModel.DataAnnotations.DataType.DateTime,ErrorMessage="时间格式不正确")]
			public DateTime? CreateTime { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "经办人", Order = 3)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object CreatePerson { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "预留单编号", Order = 4)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object No { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "申请人", Order = 5)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
            public object ApplicantsId { get; set; }
            

			[ScaffoldColumn(true)]
			[Display(Name = "预留开始时间", Order = 6)]
			[DataType(System.ComponentModel.DataAnnotations.DataType.DateTime,ErrorMessage="时间格式不正确")]
			[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")]

			public DateTime? StartTime { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "预留时间", Order = 7)]
			[Range(0,2147483646, ErrorMessage="数值超出范围")]
			public int? ReserveTime { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "状态", Order = 8)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object State { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "预留墓地唯一标识", Order = 9)]
			[StringLength(50, ErrorMessage = "长度不可超过50")]
			public object CemeteryId { get; set; }

			[ScaffoldColumn(true)]
			[Display(Name = "预留墓地", Order = 10)]
			[StringLength(200, ErrorMessage = "长度不可超过200")]
			public object CemeteryName { get; set; }

			

    }


}

